import request from '@/http/request'
// 商圈列表
export const $getBusinesslList = (params:any) => {
    return request.request({
      url: '/api/mchGroup',
      method: 'get',
      params: params
    })
  }
//   商圈管理删除 /api/marketingGroup/remove
export const $delBusiness = (params:any) => {
    return request.request({
      url: '/api/mchGroup/remove',
      method: 'post',
      data: params
    })
  }

// 商圈管理添加和修改  /api/marketingGroup/save
export const $addorUpdataBusiness = (url:any,data:any) => {
    return request.request({
      url: url,
      method: 'post',
      data: data,
    })
  }

//   商圈详情 /api/marketingGroup/getInfo
export const $getBusinessInfo = (params:any) => {
    return request.request({
      url: '/api/mchGroup/getInfo',
      method: 'post',
      data: params
    })
  }


  /* 获取请求参数 */
  export function $getUploadFormParams (file:any, bizType:any) {  
    return request.request({
      url: '/api/ossFiles/form',
      method: 'post',
      data: { bizType : bizType, sourceFileName: file.name, sourceFileSize: file.size }
    })
  }

//   删除商户 /api/marketingGroup/groupMch/remove
export const $delBusinessMch = (params:any) => {
    return request.request({
      url: '/api/marketingGroup/groupMch/remove',
      method: 'post',
      data: params
    })
  }

//   商圈信息 /api/marketingGroup/groupMchList
export const $getBusinessMchList = (params:any) => {
    return request.request({
      url: '/api/marketingGroup/groupMchList',
      method: 'post',
      data: params
    })
  }